/*
 * ScoreManger.java
 *
 *  Copyright (c) 2008 Corey Oliver and Anshul Kumaria
 *
 *  This file is part of Balls of Fury.
 *
 *  Balls of Fury is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Balls of Fury is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 *
 */

/*
 * EDIT:  03/13/2008 - This is an example of how an edit performed to the class 
 * would appear.
 */
package ballsoffury.game;

/**
 *
 * @author Anshul Kumaria
 */
public class ScoreManager {
    
    private static int playerOneScore = 0;
    private static int playerTwoScore = 0;
    private static final int maxPoints = 11;
    
    public static void incrementPlayerOneScore(){
        playerOneScore++;
            if(isScoreMaxed()){
                resetScores();
            }
    }
    public static void incrementPlayerTwoScore(){
        playerTwoScore++;
             if(isScoreMaxed()){
                resetScores();
             }
    }
    
    private static boolean isScoreMaxed(){
         if(playerOneScore == 11){
             return true;
         }
      
         if(playerTwoScore == 11){
             return true;
         }
         return false;
        }
    
    private static void resetScores(){
        playerOneScore = 0;
        playerTwoScore = 0;
    }
    
    public static int getPlayerOneScore(){
        return playerOneScore;
    }
    
    public static int getPlayerTwoScore(){
        return playerTwoScore;
    }
}
